import java.awt.Dimension;

import javax.swing.BoxLayout;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JSplitPane;

public class MainFrame extends JFrame {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	FilesList mainList;

	public MainFrame() {
		super("Full Explorer");
		this.setVisible(true);
		this.setSize(new Dimension(400, 300));
		
		JSplitPane split = new JSplitPane();
		
		
		JPanel panH = new JPanel();
		panH.setLayout(new BoxLayout(panH, BoxLayout.X_AXIS));

		mainList = new FilesList(System.getProperty("user.home"));
		JScrollPane scrollFiles = new JScrollPane(mainList);
		scrollFiles.setPreferredSize(new Dimension(300, 100));
		scrollFiles.setMinimumSize(new Dimension(100, 100));
		
		FilesList list2 = new FilesList("/");
		JScrollPane scrollFiles2 = new JScrollPane(list2);
		scrollFiles2.setPreferredSize(new Dimension(300, 100));
		scrollFiles2.setMinimumSize(new Dimension(100, 100));
		
		panH.add(scrollFiles);
		panH.add(scrollFiles2);
		JScrollPane panLists = new JScrollPane(panH);
		
		split.setLeftComponent(panLists);
		split.setRightComponent(new JPanel());
		this.add(split);
		
		/*
		JSplitPane split = new JSplitPane();
		split.setRightComponent(scrollFiles2);
		split.setLeftComponent(scrollFiles);
		
		split.setOneTouchExpandable(true);
		split.setDividerLocation(150);
		split.setVisible(true);
		this.add(split, BorderLayout.CENTER);
		*/
	}
}
